Integrand size = 31, antiderivative size = 269 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {1}{16} \left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) x+\frac {\left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \sin (c+d x)}{5 d}+\frac {\left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \left (18 a A b+14 a^2 B+5 b^2 B\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {b^2 (3 A b+4 a B) \cos ^4(c+d x) \sin (c+d x)}{15 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}-\frac {\left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \sin ^3(c+d x)}{15 d} \]
[Out]
Time = 0.58 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3069, 3112, 3102, 2827, 2715, 8, 2713} \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {b \left (14 a^2 B+18 a A b+5 b^2 B\right ) \sin (c+d x) \cos ^3(c+d x)}{24 d}-\frac {\left (5 a^3 B+15 a^2 A b+12 a b^2 B+4 A b^3\right ) \sin ^3(c+d x)}{15 d}+\frac {\left (5 a^3 B+15 a^2 A b+12 a b^2 B+4 A b^3\right ) \sin (c+d x)}{5 d}+\frac {\left (8 a^3 A+18 a^2 b B+18 a A b^2+5 b^3 B\right ) \sin (c+d x) \cos (c+d x)}{16 d}+\frac {1}{16} x \left (8 a^3 A+18 a^2 b B+18 a A b^2+5 b^3 B\right )+\frac {b^2 (4 a B+3 A b) \sin (c+d x) \cos ^4(c+d x)}{15 d}+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d} \]
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2827
Rule 3069
Rule 3102
Rule 3112
Rubi steps \begin{align*} \text {integral}& = \frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}+\frac {1}{6} \int \cos ^2(c+d x) (a+b \cos (c+d x)) \left (3 a (2 a A+b B)+\left (5 b^2 B+6 a (2 A b+a B)\right ) \cos (c+d x)+2 b (3 A b+4 a B) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {b^2 (3 A b+4 a B) \cos ^4(c+d x) \sin (c+d x)}{15 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}+\frac {1}{30} \int \cos ^2(c+d x) \left (15 a^2 (2 a A+b B)+6 \left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \cos (c+d x)+5 b \left (18 a A b+14 a^2 B+5 b^2 B\right ) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {b \left (18 a A b+14 a^2 B+5 b^2 B\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {b^2 (3 A b+4 a B) \cos ^4(c+d x) \sin (c+d x)}{15 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}+\frac {1}{120} \int \cos ^2(c+d x) \left (15 \left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right )+24 \left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \cos (c+d x)\right ) \, dx \\ & = \frac {b \left (18 a A b+14 a^2 B+5 b^2 B\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {b^2 (3 A b+4 a B) \cos ^4(c+d x) \sin (c+d x)}{15 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}+\frac {1}{5} \left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \int \cos ^3(c+d x) \, dx+\frac {1}{8} \left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) \int \cos ^2(c+d x) \, dx \\ & = \frac {\left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \left (18 a A b+14 a^2 B+5 b^2 B\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {b^2 (3 A b+4 a B) \cos ^4(c+d x) \sin (c+d x)}{15 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}+\frac {1}{16} \left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) \int 1 \, dx-\frac {\left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 d} \\ & = \frac {1}{16} \left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) x+\frac {\left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \sin (c+d x)}{5 d}+\frac {\left (8 a^3 A+18 a A b^2+18 a^2 b B+5 b^3 B\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \left (18 a A b+14 a^2 B+5 b^2 B\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {b^2 (3 A b+4 a B) \cos ^4(c+d x) \sin (c+d x)}{15 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{6 d}-\frac {\left (15 a^2 A b+4 A b^3+5 a^3 B+12 a b^2 B\right ) \sin ^3(c+d x)}{15 d} \\ \end{align*}
Time = 1.67 (sec) , antiderivative size = 289, normalized size of antiderivative = 1.07 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {480 a^3 A c+1080 a A b^2 c+1080 a^2 b B c+300 b^3 B c+480 a^3 A d x+1080 a A b^2 d x+1080 a^2 b B d x+300 b^3 B d x+120 \left (18 a^2 A b+5 A b^3+6 a^3 B+15 a b^2 B\right ) \sin (c+d x)+15 \left (16 a^3 A+48 a A b^2+48 a^2 b B+15 b^3 B\right ) \sin (2 (c+d x))+240 a^2 A b \sin (3 (c+d x))+100 A b^3 \sin (3 (c+d x))+80 a^3 B \sin (3 (c+d x))+300 a b^2 B \sin (3 (c+d x))+90 a A b^2 \sin (4 (c+d x))+90 a^2 b B \sin (4 (c+d x))+45 b^3 B \sin (4 (c+d x))+12 A b^3 \sin (5 (c+d x))+36 a b^2 B \sin (5 (c+d x))+5 b^3 B \sin (6 (c+d x))}{960 d} \]
[In]
[Out]
Time = 5.09 (sec) , antiderivative size = 213, normalized size of antiderivative = 0.79
method | result | size |
parts | \(\frac {\left (A \,b^{3}+3 B a \,b^{2}\right ) \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {\left (3 A a \,b^{2}+3 B \,a^{2} b \right ) \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {\left (3 A \,a^{2} b +B \,a^{3}\right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {A \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {B \,b^{3} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) | \(213\) |
parallelrisch | \(\frac {\left (240 A \,a^{3}+720 A a \,b^{2}+720 B \,a^{2} b +225 B \,b^{3}\right ) \sin \left (2 d x +2 c \right )+\left (240 A \,a^{2} b +100 A \,b^{3}+80 B \,a^{3}+300 B a \,b^{2}\right ) \sin \left (3 d x +3 c \right )+\left (90 A a \,b^{2}+90 B \,a^{2} b +45 B \,b^{3}\right ) \sin \left (4 d x +4 c \right )+\left (12 A \,b^{3}+36 B a \,b^{2}\right ) \sin \left (5 d x +5 c \right )+5 B \,b^{3} \sin \left (6 d x +6 c \right )+\left (2160 A \,a^{2} b +600 A \,b^{3}+720 B \,a^{3}+1800 B a \,b^{2}\right ) \sin \left (d x +c \right )+480 x \left (A \,a^{3}+\frac {9}{4} A a \,b^{2}+\frac {9}{4} B \,a^{2} b +\frac {5}{8} B \,b^{3}\right ) d}{960 d}\) | \(215\) |
derivativedivides | \(\frac {B \,b^{3} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {A \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+\frac {3 B a \,b^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+3 A a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 B \,a^{2} b \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+A \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\frac {B \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+A \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(270\) |
default | \(\frac {B \,b^{3} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {A \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+\frac {3 B a \,b^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+3 A a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 B \,a^{2} b \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+A \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\frac {B \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+A \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(270\) |
risch | \(\frac {a^{3} A x}{2}+\frac {9 x A a \,b^{2}}{8}+\frac {9 x B \,a^{2} b}{8}+\frac {5 b^{3} B x}{16}+\frac {9 \sin \left (d x +c \right ) A \,a^{2} b}{4 d}+\frac {5 \sin \left (d x +c \right ) A \,b^{3}}{8 d}+\frac {3 a^{3} B \sin \left (d x +c \right )}{4 d}+\frac {15 \sin \left (d x +c \right ) B a \,b^{2}}{8 d}+\frac {B \,b^{3} \sin \left (6 d x +6 c \right )}{192 d}+\frac {\sin \left (5 d x +5 c \right ) A \,b^{3}}{80 d}+\frac {3 \sin \left (5 d x +5 c \right ) B a \,b^{2}}{80 d}+\frac {3 \sin \left (4 d x +4 c \right ) A a \,b^{2}}{32 d}+\frac {3 \sin \left (4 d x +4 c \right ) B \,a^{2} b}{32 d}+\frac {3 \sin \left (4 d x +4 c \right ) B \,b^{3}}{64 d}+\frac {\sin \left (3 d x +3 c \right ) A \,a^{2} b}{4 d}+\frac {5 \sin \left (3 d x +3 c \right ) A \,b^{3}}{48 d}+\frac {\sin \left (3 d x +3 c \right ) B \,a^{3}}{12 d}+\frac {5 \sin \left (3 d x +3 c \right ) B a \,b^{2}}{16 d}+\frac {\sin \left (2 d x +2 c \right ) A \,a^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) A a \,b^{2}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) B \,a^{2} b}{4 d}+\frac {15 \sin \left (2 d x +2 c \right ) B \,b^{3}}{64 d}\) | \(353\) |
norman | \(\frac {\left (\frac {1}{2} A \,a^{3}+\frac {9}{8} A a \,b^{2}+\frac {9}{8} B \,a^{2} b +\frac {5}{16} B \,b^{3}\right ) x +\left (3 A \,a^{3}+\frac {27}{4} A a \,b^{2}+\frac {27}{4} B \,a^{2} b +\frac {15}{8} B \,b^{3}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (3 A \,a^{3}+\frac {27}{4} A a \,b^{2}+\frac {27}{4} B \,a^{2} b +\frac {15}{8} B \,b^{3}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (10 A \,a^{3}+\frac {45}{2} A a \,b^{2}+\frac {45}{2} B \,a^{2} b +\frac {25}{4} B \,b^{3}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {1}{2} A \,a^{3}+\frac {9}{8} A a \,b^{2}+\frac {9}{8} B \,a^{2} b +\frac {5}{16} B \,b^{3}\right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{2} A \,a^{3}+\frac {135}{8} A a \,b^{2}+\frac {135}{8} B \,a^{2} b +\frac {75}{16} B \,b^{3}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{2} A \,a^{3}+\frac {135}{8} A a \,b^{2}+\frac {135}{8} B \,a^{2} b +\frac {75}{16} B \,b^{3}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {\left (8 A \,a^{3}-48 A \,a^{2} b +30 A a \,b^{2}-16 A \,b^{3}-16 B \,a^{3}+30 B \,a^{2} b -48 B a \,b^{2}+11 B \,b^{3}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {\left (8 A \,a^{3}+48 A \,a^{2} b +30 A a \,b^{2}+16 A \,b^{3}+16 B \,a^{3}+30 B \,a^{2} b +48 B a \,b^{2}+11 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}-\frac {\left (40 A \,a^{3}-720 A \,a^{2} b +30 A a \,b^{2}-208 A \,b^{3}-240 B \,a^{3}+30 B \,a^{2} b -624 B a \,b^{2}+75 B \,b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d}+\frac {\left (40 A \,a^{3}+720 A \,a^{2} b +30 A a \,b^{2}+208 A \,b^{3}+240 B \,a^{3}+30 B \,a^{2} b +624 B a \,b^{2}+75 B \,b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d}-\frac {\left (72 A \,a^{3}-528 A \,a^{2} b +126 A a \,b^{2}-112 A \,b^{3}-176 B \,a^{3}+126 B \,a^{2} b -336 B a \,b^{2}-5 B \,b^{3}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {\left (72 A \,a^{3}+528 A \,a^{2} b +126 A a \,b^{2}+112 A \,b^{3}+176 B \,a^{3}+126 B \,a^{2} b +336 B a \,b^{2}-5 B \,b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}\) | \(699\) |
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 211, normalized size of antiderivative = 0.78 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {15 \, {\left (8 \, A a^{3} + 18 \, B a^{2} b + 18 \, A a b^{2} + 5 \, B b^{3}\right )} d x + {\left (40 \, B b^{3} \cos \left (d x + c\right )^{5} + 48 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \cos \left (d x + c\right )^{4} + 160 \, B a^{3} + 480 \, A a^{2} b + 384 \, B a b^{2} + 128 \, A b^{3} + 10 \, {\left (18 \, B a^{2} b + 18 \, A a b^{2} + 5 \, B b^{3}\right )} \cos \left (d x + c\right )^{3} + 16 \, {\left (5 \, B a^{3} + 15 \, A a^{2} b + 12 \, B a b^{2} + 4 \, A b^{3}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (8 \, A a^{3} + 18 \, B a^{2} b + 18 \, A a b^{2} + 5 \, B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 721 vs. \(2 (277) = 554\).
Time = 0.43 (sec) , antiderivative size = 721, normalized size of antiderivative = 2.68 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\begin {cases} \frac {A a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {A a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {A a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {2 A a^{2} b \sin ^{3}{\left (c + d x \right )}}{d} + \frac {3 A a^{2} b \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {9 A a b^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {9 A a b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {9 A a b^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {9 A a b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {15 A a b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {8 A b^{3} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 A b^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {A b^{3} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {2 B a^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {B a^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {9 B a^{2} b x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {9 B a^{2} b x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {9 B a^{2} b x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {9 B a^{2} b \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {15 B a^{2} b \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {8 B a b^{2} \sin ^{5}{\left (c + d x \right )}}{5 d} + \frac {4 B a b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 B a b^{2} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {5 B b^{3} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {15 B b^{3} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {15 B b^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {5 B b^{3} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {5 B b^{3} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {5 B b^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} + \frac {11 B b^{3} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (A + B \cos {\left (c \right )}\right ) \left (a + b \cos {\left (c \right )}\right )^{3} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 266, normalized size of antiderivative = 0.99 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} - 320 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{3} - 960 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} b + 90 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} b + 90 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a b^{2} + 192 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} B a b^{2} + 64 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A b^{3} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{3}}{960 \, d} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 230, normalized size of antiderivative = 0.86 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {B b^{3} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} + \frac {1}{16} \, {\left (8 \, A a^{3} + 18 \, B a^{2} b + 18 \, A a b^{2} + 5 \, B b^{3}\right )} x + \frac {{\left (3 \, B a b^{2} + A b^{3}\right )} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {3 \, {\left (2 \, B a^{2} b + 2 \, A a b^{2} + B b^{3}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (4 \, B a^{3} + 12 \, A a^{2} b + 15 \, B a b^{2} + 5 \, A b^{3}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (16 \, A a^{3} + 48 \, B a^{2} b + 48 \, A a b^{2} + 15 \, B b^{3}\right )} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} + \frac {{\left (6 \, B a^{3} + 18 \, A a^{2} b + 15 \, B a b^{2} + 5 \, A b^{3}\right )} \sin \left (d x + c\right )}{8 \, d} \]
[In]
[Out]
Time = 1.25 (sec) , antiderivative size = 352, normalized size of antiderivative = 1.31 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {A\,a^3\,x}{2}+\frac {5\,B\,b^3\,x}{16}+\frac {9\,A\,a\,b^2\,x}{8}+\frac {9\,B\,a^2\,b\,x}{8}+\frac {5\,A\,b^3\,\sin \left (c+d\,x\right )}{8\,d}+\frac {3\,B\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {5\,A\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}+\frac {B\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {A\,b^3\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {15\,B\,b^3\,\sin \left (2\,c+2\,d\,x\right )}{64\,d}+\frac {3\,B\,b^3\,\sin \left (4\,c+4\,d\,x\right )}{64\,d}+\frac {B\,b^3\,\sin \left (6\,c+6\,d\,x\right )}{192\,d}+\frac {3\,A\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {A\,a^2\,b\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {3\,A\,a\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,B\,a^2\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {5\,B\,a\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{16\,d}+\frac {3\,B\,a^2\,b\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,B\,a\,b^2\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {9\,A\,a^2\,b\,\sin \left (c+d\,x\right )}{4\,d}+\frac {15\,B\,a\,b^2\,\sin \left (c+d\,x\right )}{8\,d} \]
[In]
[Out]